package cn.itcast.java.process;

import java.util.concurrent.TimeUnit;

/**
 * Author itcast
 * Date 2021/10/7 10:00
 * Desc TODO
 */
public class DeadLoopDemo {
    public static void main(String[] args) throws InterruptedException {
        //1秒钟打印一个hello world
        /*for(;;){
            System.out.println("hello world");
            TimeUnit.SECONDS.sleep(1);
        }*/
        while(true){
            System.out.println("hello world");
            //每 30 分钟从数据库中读取一次配置数据
            TimeUnit.MINUTES.sleep(30);
        }
    }
}
